<?php
/**
 *
 */

class ModelXuesheng extends GetLoad{

 	public function Getclass($class_id){
 		$reluse=$this->SQLquery("SELECT * from class where class_id=".$class_id);
 		//var_dump($reluse);
 		return $reluse[0];
 	}


 	public function Gettongxue($class_id=1){
 		$reluse=$this->SQLquery("SELECT * from name where class=".$class_id);
 		//var_dump($reluse);
 		return $reluse;

 	}

 	public function Getxiaozu($class_id){

 		$reluse=$this->SQLquery("SELECT * from xiaozu_zhuce where class=".$class_id);
 		//var_dump($reluse);
 		return $reluse;

 	}

 	public function Getxiaozuchengyuan($xiaozu_id){

 		$reluse=$this->SQLquery("SELECT * from xiaozu where xiaozu_id=".$xiaozu_id);
 		//var_dump($reluse);
 		return $reluse;

 	}

 	public function Getxiaozume($name_id){

 		$reluse=$this->SQLquery("SELECT * from xiaozu where chengyuan_id=".$name_id);
 		//var_dump($reluse);
 		return $reluse;

 	}

 	public function Getxiaozuone($xiaozu_id){

 		$reluse=$this->SQLquery("SELECT * from xiaozu where xiaozu_id=".$xiaozu_id);
 		//var_dump($reluse);
 		return $reluse;

 	}

 	public function Getlaoshi($xiaozu_id){
 		$reluse=$this->SQLquery("SELECT * from xiaozu_zhuce where xiaozu_id=".$xiaozu_id);
 		$reluse=$this->SQLquery("SELECT * from name where name_id=".$reluse[0]['laoshi']);
 		//var_dump($reluse);
 		return $reluse[0]['name'];
 	}

 	public function Getlaoshime($class){
 		$reluse=$this->SQLquery("SELECT * from laoshi where class=".$class);
 		return $reluse;

 	}

 	public function Getshiyandengji($yiqi_id,$name_id,$baogao_id){
 		$this->SQLcun("INSERT INTO yiqishiyong (yiqi_id,shiyongzhe_id,baogao_id,shijian) VALUES (".$yiqi_id.",".$name_id.",'".$baogao_id."','".date("Y-m-d\TH:i:s\Z")."')");

 	}


}